An embodiment of the invention relates to the field of serial communications, and in particular, an apparatus and method for recovering data from a serial data stream.
Serial interfaces operating in accordance with Universal Serial Bus (USB) or Serial Advanced Technology Attachment (Serial-ATA) communication protocols are adapted to extract data from an incoming serial data stream. In order to minimize data loss and avoid a connection failure, serial interface logic must quickly xe2x80x9clock onxe2x80x9d to the incoming data stream by detecting the center of each data bit signal. The center of each data bit signal, when oversampled, is usually the sample located at or around the midpoint between signal edges. However, such detection may be difficult due the presence of timing variations such as jitter or frequency offsets.
For instance, when a serial interface starts receiving a data stream after an idle condition, it has no history to guide it in determining which data sample to select. In the absence of jitter, the edge would consistently be detected at the same sampled location. But with the presence of jitter, however, the location of these edges may vary over time, in some cases across approximately one-half of the number of sample locations.
As previously mentioned, at the start of the incoming serial stream, only a few edges will be received before the serial interface is required to be locked onto the incoming data stream. For example, the xe2x80x9cUniversal Serial Bus Specification Version 2.0xe2x80x9d (published Apr. 27, 2000) allows for only seven (7) edges before the serial interface is required to lock onto the incoming stream and guarantee receipt of the correct data. One clear problem is that if a large amount of jitter is present in the data stream, but only a few edges are received, it is statistically possible that the edges received are at either extreme of the possible edge locations. Hence, it may be quite difficult for the serial interface to detect the edges of the incoming data stream or at least converge to the appropriate locations for such edges. A lack of such detection or convergence may cause the serial communication session to accidentally fail.